import requests, unittest


class GetEventTest(unittest.TestCase):
    def setUp(self):
        self.baseurl = 'http://127.0.0.1:8000/api/get_event_list/'

    def test_get_event_success(self):
        r = requests.get('http://127.0.0.1:8000/api/get_event_list/?eid=1')
        result = r.json()
        self.assertEqual(result['status'], 200)
        self.assertEqual(result['message'], 'success')

    def tearDown(self):
        print("test end")


if __name__ == '__main__':
    unittest.main()
